"use strict";
const path = require("path");

function resolve(dir) {
    return path.join(__dirname, ".", dir);
}

module.exports = {
    context: path.resolve(__dirname, "./"),
    resolve: {
        extensions: [ ".js", ".vue", ".json" ],
        alias: {
            "@": resolve("src"),
            "@img": resolve("src/assets/images/"),
            "@api": resolve("src/api/"),
            "@utils": resolve("src/utils/"),
            "@pages": resolve("src/pages"),
            "@plugins": resolve("src/plugins"),
            "@comp": resolve("src/components")
        }
    }
};

// 请在 webstorm——>设置——>语言和框架——>JavaScript——>webpack 中使用此配置
